package godis

type SliceResult struct {
	Result []interface{}

	Err error
}

func NewSliceResult(result []interface{}, err error) *SliceResult {
	return &SliceResult{Result: result, Err: err}
}

func (self *SliceResult) UnWarp() []interface{} {

	if self.Err != nil {
		panic(self.Err)

	}

	return self.Result
}

func (self *SliceResult) Iter() *Iterator {

	return NewIterator(self.Result)

}
